<?php foreach ($this->friends as $friend):?>
	<?php $cur_user_id = Zend_Auth::getInstance()->getIdentity()->id;?>
	<?php $user_id_model = ($friend->user_id == $cur_user_id ? $friend->user_friend : $friend->user_id)?>
	<?php $model_user = new Model_User($user_id_model)?>
	
	<a
	href="<?php
    echo $this->url(array('controller' => $model_user->login, 'action' => null, 'request'=>null),"default")?>"><?php
    echo $model_user->login
    ?></a> <?php if($model_user->checkOnline($user_id_model)){
    	echo $this->translate("Online");
    		}else{
    	echo $this->translate("Offline");
    		}
    ?>
	  
	
	<a
	href="<?php
    echo $this->url(array('controller' => 'friend', 'action' => 'remove', 'request'=>$user_id_model),"default")?>"><?php
    echo $this->translate("Remove from friends");
    ?></a>
    <br/>
<?php endforeach;?>